import request from '@/utils/request'

//下载模板
export function downloadHolidaySettingTemlate(query){
  return request({
    url: '/system/globalSettings/importTemplate',
    method: 'post',

  })
}

// 查询假期设置列表
export function listHolidaySettings(query) {
  return request({
    url: '/system/globalSettings/list',
    method: 'get',
    params: query
  })
}

// 查询假期设置详细
export function getHolidaySettings(id) {
  return request({
    url: '/system/globalSettings/' + id,
    method: 'get'
  })
}

//获取所有假期信息
export function getHolidaySettingsList(){
  return request({
    url:'/system/globalSettings/getHolidaySettingsList',
    method:'get'
  })
}

// 新增假期设置
export function addHolidaySettings(data) {
  return request({
    url: '/system/globalSettings',
    method: 'post',
    data: data
  })
}

// 修改假期设置
export function updateHolidaySettings(data) {
  return request({
    url: '/system/globalSettings',
    method: 'put',
    data: data
  })
}

/**
 * 查看考勤信息
 * @returns {*}
 */
export function attendanceList(){
  return request({
    url: '/system/globalSettings/attendanceList',
    method: 'get',
  })
}

// 新增、修改考勤时间
export function saveAttendanceTime(data) {
  return request({
    url: '/system/globalSettings/saveAttendanceTime',
    method: 'post',
    data: data
  })
}

